package org.fujene.memman.backup;

import java.util.LinkedHashMap;
import java.util.concurrent.Callable;

import org.fujene.memman.ReplicateMemoryManager;
import org.fujene.structure.LookupPointer;

public class InvertIndexSnapshoter implements Callable<LinkedHashMap<Long, Integer>>{
	private ReplicateMemoryManager manager;
	private LookupPointer ptr;
	private int length;

	public InvertIndexSnapshoter(ReplicateMemoryManager manager, LookupPointer ptr, int length){
		this.manager = manager;
		this.ptr = ptr;
		this.length = length;
	}
	
	@Override
	public LinkedHashMap<Long, Integer> call() throws Exception{
		return manager.getContentsByHash(ptr, length);
	}
}
